package chess

type situation struct {
	curr operation
	next action
}

type operation struct {
	operator uint32
	action   uint32
	location uint32
	comment  uint32
}

type action struct {
	turn    bool
	operate uint32
}

type point struct {
	index uint32
	color uint32
}

type coperate struct {
	code uint32
}

type messageput struct {
	code     uint32
	location uint32
}

type messagekill struct {
	code     uint32
	location uint32
}

type messagemove struct {
	code   uint32
	source uint32
	direct uint32
}

type putresponse struct {
	code     uint32
	location uint32
}

type killresponse struct {
	code     uint32
	location uint32
}

type moveresponse struct {
	code   uint32
	source uint32
	target uint32
}

type nextaction struct {
	turn   bool
	action uint32
}

func next_action(turn bool, number uint8) nextaction {
	if number == 0 {
		return nextaction{turn, 302}
	} else {
		return nextaction{turn, 303}
	}
}
